Technote Number: 1093796
Problem:
This issue was reported to Lotus software Quality Engineering and has been
addressed in Notes Domino 6.0.4 and 6.5.2.
Excerpt from the Lotus Notes and Domino Release 6.0.4 and 6.5.2 MR fix lists
(available at http://www.ibm.com/developerworks/lotus):
Editor
SPR# GFLY5L9KN2 - Uidoc.GoToField() will properly change table rows if the
field it 'goes to' is in a row not currently visible. This regression was
introduced in 6.0.1.
The issue originally occured in versions 5.0, 5.0.1 and 5.0.2 of Notes 5.x and
stopped ocurring in 5.0.3 and later versions of the 5.x. The issue reappeared
in Notes 6.0 and later releases.
The @Command EditGoToField and the LotusScript GoToField method do actually
relocate the cursor to the correct field; however, the tabbed table does not
automatically switch to the tab that contains the designated field. If you
manually select the tab that contains the designated field after clicking the
button, you will see that the cursor is in the appropriate field.
Workaround:
Since your field is in a Tabbed table, additional programming can be used to
switch the table to the tab that contains the designated field. First, you
must make the Tabbed table a programmed table. This allows you to program the
button to switch to the appropriate table tab first, and then go to the field.
To make the tabbed table a programmed table, follow these steps:
1. In the Designer Client, place your cursor anywhere on your tabbed table and
select Table, Table Properties from the menu to display the Table Properties
dialog box.
2. Switch to the "Table Rows" tab (second from right) on the Table Properties
dialog box and, in the "Which Row to Display" section, select the "Switch Rows
Programmatically" option and then, directly below it, select the "Also Show
Tabs so User Can Pick Row" option.
3. If you haven't already given names for each of the tabs on your table, do so
by placing your cursor on the first tab of your table and then entering a name
in the "Tab Label" option at the button of the same (Table Row) tab on the
Table Properties dialog box. Then, place your cursor on the next tab of your
table and enter a name for that tab in the "Tab Label" option, and so on for
each tab of the table.
4. Then, switch to the "Table Programming" tab (right-most tab) on the Table
Properties dialog box, and in the "Table HTML Tags" section, enter a name for
your table in the "Name/Id" option. This will be the name of your table.
At this point, your tabbed table is now a programmed table and you can access
the table and the individual table tabs by their names and switch from tab to
tab in your button formula.
@Command code example:
For example if your original code was similar to the following:
@Command([EditGoToField]; "<FieldName>")
Modify your formula so that it will switch to the appropriate table tab (from
Step 3 above) and then go to the field as follows:
FIELD $<TableName> := "<TabName>";
@Command([RefreshHideFormulas]);
@Command([EditGoToField]; "<FieldName>");
@SetField("$<TableName>"; @DeleteField)
In this formula, replace both instances of <TableName> with the name you gave
your table (from Step 4 above), replace <TabName> with the name of the tab
that contains the field and replace <FieldName> with the name of the field.
Line one of the formula creates a Notes $field that is the name of your table
with a dollar sign in front of it. And, it sets the value of this $field to
the name of the tab that contains the field from your EditGoToField @Command.
Line two of the formula refreshes the Hide / When formulas in the form. This
switches the table tabs to the tab that is the value listed in the $TableName
field.
Line three of the formula moves the cursor to the field on that tab.
Line four of the formula deletes the $field from the document. If you do not
delete this $field, the document will always open with the tab listed in the
$field on top in the table.
LotusScript example:
For example if your original code was similar to the following:
Call uidoc.gotofield("<FieldName>")
Modify your formula so that it will switch to the appropriate table tab (from
Step Three above) and then go to the field as follows:
set doc=uidoc.document
doc.~$<TableName> ="<TabName>"
Call uidoc.refresh
Call uidoc.gotofield("<FieldName>")
Call doc.removeitem("$<TableName>")
In this formula, replace both instances of <TableName> with the name you gave
your table (from Step 4 above), replace <TabName> with the name of the tab
(from step three above) that contains the field and replace <FieldName> with
the name of the field.
Line two of the formula creates a Notes $field that is the name of your table
with a dollar sign in front of it. And, it sets the value of this $field to
the name of the tab that contains the field from the GoToField call.
Line three of the formula refreshes the Hide / When formulas in the form. This
switches the table tabs to the tab that is the value listed in the $TableName
field.
Line four of the formula moves the cursor to the field on that tab.
Line five of the formula deletes the $field from the document. If you do not
delete this $field, the document will always open with the tab listed in the
$field on top in the table. More >
|  |
|
|
|
|